package fr.bordeaux1.planingdesetudiants.model;

public class Enseignant {
	
	private int id;
	private String nom;
	private String prenom;
	private char[] disponibilite;
	
	public Enseignant() {
		this.disponibilite = "TTTTTTTTTTTTTTTTTTTT".toCharArray();
	}
	
	public int getId() {
		return id;
	}
	
	public void setId(int id) {
		this.id = id;
	}
	
	public String getNom() {
		return nom;
	}
	
	public void setNom(String nom) {
		this.nom = nom;
	}
	
	public String getPrenom() {
		return prenom;
	}
	
	public void setPrenom(String prenom) {
		this.prenom = prenom;
	}
	
	public char[] getDisponibilite() {
		return disponibilite;
	}
	
	public void setDisponibilite(char[] disponibilite) {
		assert disponibilite.length == 20;
		this.disponibilite = disponibilite;
	}
	
	public boolean isDisponible(int creneau){
		return disponibilite[creneau-1]=='T';
	}
	
	public void setDisponible(int creneau, boolean disponible){
		disponibilite[creneau-1] = disponible?'T':'F';
	}
	
}
